package za.ac.wits.elen7045.scraper.providers;

import za.ac.wits.elen7045.persistence.exception.NotSupportedException;
import za.ac.wits.elen7045.persistence.model.ServiceProvider;
import za.ac.wits.elen7045.scraper.interfaces.BaseScraper;

public class ScraperServiceFactory {
	public static BaseScraper getScraperServiceForProvider(ServiceProvider serviceProvider) throws Exception {
		switch (serviceProvider.getServiceProviderType()) {
		case TESTING:
			return new za.ac.wits.elen7045.scraper.providers.testing.ScraperService(serviceProvider);
		case PAY_FINE:
			return new za.ac.wits.elen7045.scraper.providers.payfine.ScraperService(serviceProvider);
		case VODACOM:
			return null;
			//return new StandardBankScraperService(site.GetUsername(),
			//		site.GetPassword());
		default:
			throw new NotSupportedException();
		}
	}

}
